/*
 * rdp.h
 *
 *  Created on: Oct 12, 2011
 *      Author: welcome
 */

#ifndef RDP_H_
#define RDP_H_

#include <rdesktop.h>

#ifdef __cplusplus
extern "C" {
#endif

extern int rdp_in_unistr(STREAM s, char *string, int str_len, int in_len);
extern void rdp_out_unistr(STREAM s, const char *string, int len);
extern void rdp_send_input(uint32 time, uint16 message_type,
		uint16 device_flags, uint16 param1, uint16 param2);
extern void rdp_send_client_window_status(int status);
extern void process_colour_pointer_pdu(STREAM s);
extern void process_new_pointer_pdu(STREAM s);
extern void process_cached_pointer_pdu(STREAM s);
extern void process_system_pointer_pdu(STREAM s);
extern void process_bitmap_updates(STREAM s);
extern void process_palette(STREAM s);
extern void process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason);
extern void rdp_main_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
extern RD_BOOL rdp_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
extern RD_BOOL rdp_connect(char *server, uint32 flags, char *domain,
		char *password, char *command, char *directory, RD_BOOL reconnect);
extern void rdp_reset_state(void);
extern void rdp_disconnect(void);
#ifdef __cplusplus
}
#endif

#endif /* RDP_H_ */
